﻿@model CustomerUserSettingsModel
@using Telerik.Web.Mvc.UI;
@using Nop.Core.Domain.Customers;
@using Nop.Core.Domain.Security;
@{
    //page title
    ViewBag.Title = T("Admin.Configuration.Settings.CustomerUser").Text;
}
@using (Html.BeginForm())
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Administration/Content/images/ico-configuration.png")" alt="" />
            @T("Admin.Configuration.Settings.CustomerUser")
        </div>
        <div class="options">
            <input type="submit" name="save" class="t-button" value="@T("Admin.Common.Save")" />
        </div>
    </div>
    
    @Html.ValidationSummary(false)

    
    @Html.Telerik().TabStrip().Name("customersettings-edit").Items(x =>
{
    x.Add().Text(T("Admin.Configuration.Settings.CustomerUser.CustomerSettings").Text).Content(TabCustomerSettings().ToHtmlString()).Selected(true);
    x.Add().Text(T("Admin.Configuration.Settings.CustomerUser.CustomerFormFields").Text).Content(TabCustomerFormFields().ToHtmlString());
    x.Add().Text(T("Admin.Configuration.Settings.CustomerUser.AddressFormFields").Text).Content(TabAddressFormFields().ToHtmlString());
    x.Add().Text(T("Admin.Configuration.Settings.CustomerUser.DateTimeSettings").Text).Content(TabDateTimeSettings().ToHtmlString());
    x.Add().Text(T("Admin.Configuration.Settings.CustomerUser.ExternalAuthenticationSettings").Text).Content(TabExternalAuthenticationSettings().ToHtmlString());

    //generate an event
    EngineContext.Current.Resolve<IEventPublisher>().Publish(new AdminTabStripCreated(x, "customersettings-edit"));
})
}
@helper TabCustomerSettings()
{
    <script type="text/javascript">
        $(document).ready(function () {

            $("#@Html.FieldIdFor(model => model.CustomerSettings.AllowCustomersToUploadAvatars)").click(toggleAvatar);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.UsernamesEnabled)").click(toggleUsername);


            toggleAvatar();
            toggleUsername();
        });

        function toggleAvatar() {
            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.AllowCustomersToUploadAvatars)').is(':checked')) {
                $('#pnlDefaultAvatarEnabled').show();
            }
            else {
                $('#pnlDefaultAvatarEnabled').hide();
            }
        }

        function toggleUsername() {
            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.UsernamesEnabled)').is(':checked')) {
                $('#pnlAllowUsersToChangeUsernames').show();
                $('#pnlCheckUsernameAvailability').show();
            }
            else {
                $('#pnlAllowUsersToChangeUsernames').hide();
                $('#pnlCheckUsernameAvailability').hide();
            }
        }
        
    </script>
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.UsernamesEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.UsernamesEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.UsernamesEnabled)
            </td>
        </tr>
        <tr id="pnlAllowUsersToChangeUsernames">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.AllowUsersToChangeUsernames):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.AllowUsersToChangeUsernames)
                @Html.ValidationMessageFor(model => model.CustomerSettings.AllowUsersToChangeUsernames)
            </td>
        </tr>
        <tr id="pnlCheckUsernameAvailability">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.CheckUsernameAvailabilityEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.CheckUsernameAvailabilityEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.CheckUsernameAvailabilityEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.UserRegistrationType):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.CustomerSettings.UserRegistrationType, ((UserRegistrationType)Model.CustomerSettings.UserRegistrationType).ToSelectList())
                @Html.ValidationMessageFor(model => model.CustomerSettings.UserRegistrationType)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.AllowCustomersToUploadAvatars):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.AllowCustomersToUploadAvatars)
                @Html.ValidationMessageFor(model => model.CustomerSettings.AllowCustomersToUploadAvatars)
            </td>
        </tr>
        <tr id="pnlDefaultAvatarEnabled">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.DefaultAvatarEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.DefaultAvatarEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.DefaultAvatarEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.ShowCustomersLocation):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.ShowCustomersLocation)
                @Html.ValidationMessageFor(model => model.CustomerSettings.ShowCustomersLocation)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.ShowCustomersJoinDate):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.ShowCustomersJoinDate)
                @Html.ValidationMessageFor(model => model.CustomerSettings.ShowCustomersJoinDate)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.AllowViewingProfiles):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.AllowViewingProfiles)
                @Html.ValidationMessageFor(model => model.CustomerSettings.AllowViewingProfiles)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.NotifyNewCustomerRegistration):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.NotifyNewCustomerRegistration)
                @Html.ValidationMessageFor(model => model.CustomerSettings.NotifyNewCustomerRegistration)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.HideDownloadableProductsTab):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.HideDownloadableProductsTab)
                @Html.ValidationMessageFor(model => model.CustomerSettings.HideDownloadableProductsTab)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.HideBackInStockSubscriptionsTab):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.HideBackInStockSubscriptionsTab)
                @Html.ValidationMessageFor(model => model.CustomerSettings.HideBackInStockSubscriptionsTab)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.CustomerNameFormat):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.CustomerSettings.CustomerNameFormat, ((CustomerNameFormat)Model.CustomerSettings.CustomerNameFormat).ToSelectList())
                @Html.ValidationMessageFor(model => model.CustomerSettings.CustomerNameFormat)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.DefaultPasswordFormat):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.CustomerSettings.DefaultPasswordFormat, ((PasswordFormat)Model.CustomerSettings.DefaultPasswordFormat).ToSelectList())
                @Html.ValidationMessageFor(model => model.CustomerSettings.DefaultPasswordFormat)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.HideNewsletterBlock):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.HideNewsletterBlock)
                @Html.ValidationMessageFor(model => model.CustomerSettings.HideNewsletterBlock)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.StoreLastVisitedPage):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.StoreLastVisitedPage)
                @Html.ValidationMessageFor(model => model.CustomerSettings.StoreLastVisitedPage)
            </td>
        </tr>
    </table>
}
@helper TabCustomerFormFields()
{
    <script type="text/javascript">
        $(document).ready(function () {

            $("#@Html.FieldIdFor(model => model.CustomerSettings.CountryEnabled)").click(toggleCustomerCountryFormField);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.CompanyEnabled)").click(toggleCustomerRequiredFormField);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.StreetAddressEnabled)").click(toggleCustomerRequiredFormField);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.StreetAddress2Enabled)").click(toggleCustomerRequiredFormField);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.ZipPostalCodeEnabled)").click(toggleCustomerRequiredFormField);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.CityEnabled)").click(toggleCustomerRequiredFormField);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.PhoneEnabled)").click(toggleCustomerRequiredFormField);
            $("#@Html.FieldIdFor(model => model.CustomerSettings.FaxEnabled)").click(toggleCustomerRequiredFormField);


            toggleCustomerCountryFormField();
            toggleCustomerRequiredFormField();
        });

        function toggleCustomerCountryFormField() {
            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.CountryEnabled)').is(':checked')) {
                $('#pnlCustomerStateProvinceEnabled').show();
            }
            else {
                $('#pnlCustomerStateProvinceEnabled').hide();
            }
        }

        function toggleCustomerRequiredFormField() {
            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.CompanyEnabled)').is(':checked')) {
                $('#pnlCustomerCompanyRequired').show();
            }
            else {
                $('#pnlCustomerCompanyRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.StreetAddressEnabled)').is(':checked')) {
                $('#pnlCustomerStreetAddressRequired').show();
            }
            else {
                $('#pnlCustomerStreetAddressRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.StreetAddress2Enabled)').is(':checked')) {
                $('#pnlCustomerStreetAddress2Required').show();
            }
            else {
                $('#pnlCustomerStreetAddress2Required').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.ZipPostalCodeEnabled)').is(':checked')) {
                $('#pnlCustomerZipPostalCodeRequired').show();
            }
            else {
                $('#pnlCustomerZipPostalCodeRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.CityEnabled)').is(':checked')) {
                $('#pnlCustomerCityRequired').show();
            }
            else {
                $('#pnlCustomerCityRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.PhoneEnabled)').is(':checked')) {
                $('#pnlCustomerPhoneRequired').show();
            }
            else {
                $('#pnlCustomerPhoneRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.CustomerSettings.FaxEnabled)').is(':checked')) {
                $('#pnlCustomerFaxRequired').show();
            }
            else {
                $('#pnlCustomerFaxRequired').hide();
            }
        }

    </script>
    <table class="adminContent">
        <tr>
            <td colspan="2">
                <em>@T("Admin.Configuration.Settings.CustomerUser.CustomerFormFields.Description")</em>
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.GenderEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.GenderEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.GenderEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.DateOfBirthEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.DateOfBirthEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.DateOfBirthEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.CompanyEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.CompanyEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.CompanyEnabled)
            </td>
        </tr>
        <tr id="pnlCustomerCompanyRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.CompanyRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.CompanyRequired)
                @Html.ValidationMessageFor(model => model.CustomerSettings.CompanyRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.StreetAddressEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.StreetAddressEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.StreetAddressEnabled)
            </td>
        </tr>
        <tr id="pnlCustomerStreetAddressRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.StreetAddressRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.StreetAddressRequired)
                @Html.ValidationMessageFor(model => model.CustomerSettings.StreetAddressRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.StreetAddress2Enabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.StreetAddress2Enabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.StreetAddress2Enabled)
            </td>
        </tr>
        <tr id="pnlCustomerStreetAddress2Required">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.StreetAddress2Required):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.StreetAddress2Required)
                @Html.ValidationMessageFor(model => model.CustomerSettings.StreetAddress2Required)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.ZipPostalCodeEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.ZipPostalCodeEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.ZipPostalCodeEnabled)
            </td>
        </tr>
        <tr id="pnlCustomerZipPostalCodeRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.ZipPostalCodeRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.ZipPostalCodeRequired)
                @Html.ValidationMessageFor(model => model.CustomerSettings.ZipPostalCodeRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.CityEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.CityEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.CityEnabled)
            </td>
        </tr>
        <tr id="pnlCustomerCityRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.CityRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.CityRequired)
                @Html.ValidationMessageFor(model => model.CustomerSettings.CityRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.CountryEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.CountryEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.CountryEnabled)
            </td>
        </tr>
        <tr id="pnlCustomerStateProvinceEnabled">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.StateProvinceEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.StateProvinceEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.StateProvinceEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.PhoneEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.PhoneEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.PhoneEnabled)
            </td>
        </tr>
        <tr id="pnlCustomerPhoneRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.PhoneRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.PhoneRequired)
                @Html.ValidationMessageFor(model => model.CustomerSettings.PhoneRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.FaxEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.FaxEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.FaxEnabled)
            </td>
        </tr>
        <tr id="pnlCustomerFaxRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.FaxRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.FaxRequired)
                @Html.ValidationMessageFor(model => model.CustomerSettings.FaxRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.AcceptPrivacyPolicyEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.AcceptPrivacyPolicyEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.AcceptPrivacyPolicyEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CustomerSettings.NewsletterEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CustomerSettings.NewsletterEnabled)
                @Html.ValidationMessageFor(model => model.CustomerSettings.NewsletterEnabled)
            </td>
        </tr>
    </table>
}
@helper TabAddressFormFields()
{
    <script type="text/javascript">
        $(document).ready(function () {

            $("#@Html.FieldIdFor(model => model.AddressSettings.CountryEnabled)").click(toggleAddressCountryFormField);
            $("#@Html.FieldIdFor(model => model.AddressSettings.CompanyEnabled)").click(toggleAddressRequiredFormField);
            $("#@Html.FieldIdFor(model => model.AddressSettings.StreetAddressEnabled)").click(toggleAddressRequiredFormField);
            $("#@Html.FieldIdFor(model => model.AddressSettings.StreetAddress2Enabled)").click(toggleAddressRequiredFormField);
            $("#@Html.FieldIdFor(model => model.AddressSettings.ZipPostalCodeEnabled)").click(toggleAddressRequiredFormField);
            $("#@Html.FieldIdFor(model => model.AddressSettings.CityEnabled)").click(toggleAddressRequiredFormField);
            $("#@Html.FieldIdFor(model => model.AddressSettings.PhoneEnabled)").click(toggleAddressRequiredFormField);
            $("#@Html.FieldIdFor(model => model.AddressSettings.FaxEnabled)").click(toggleAddressRequiredFormField);


            toggleAddressCountryFormField();
            toggleAddressRequiredFormField();
        });

        function toggleAddressCountryFormField() {
            if ($('#@Html.FieldIdFor(model => model.AddressSettings.CountryEnabled)').is(':checked')) {
                $('#pnlAddressStateProvinceEnabled').show();
            }
            else {
                $('#pnlAddressStateProvinceEnabled').hide();
            }
        }

        function toggleAddressRequiredFormField() {
            if ($('#@Html.FieldIdFor(model => model.AddressSettings.CompanyEnabled)').is(':checked')) {
                $('#pnlAddressCompanyRequired').show();
            }
            else {
                $('#pnlAddressCompanyRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.AddressSettings.StreetAddressEnabled)').is(':checked')) {
                $('#pnlAddressStreetAddressRequired').show();
            }
            else {
                $('#pnlAddressStreetAddressRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.AddressSettings.StreetAddress2Enabled)').is(':checked')) {
                $('#pnlAddressStreetAddress2Required').show();
            }
            else {
                $('#pnlAddressStreetAddress2Required').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.AddressSettings.ZipPostalCodeEnabled)').is(':checked')) {
                $('#pnlAddressZipPostalCodeRequired').show();
            }
            else {
                $('#pnlAddressZipPostalCodeRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.AddressSettings.CityEnabled)').is(':checked')) {
                $('#pnlAddressCityRequired').show();
            }
            else {
                $('#pnlAddressCityRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.AddressSettings.PhoneEnabled)').is(':checked')) {
                $('#pnlAddressPhoneRequired').show();
            }
            else {
                $('#pnlAddressPhoneRequired').hide();
            }

            if ($('#@Html.FieldIdFor(model => model.AddressSettings.FaxEnabled)').is(':checked')) {
                $('#pnlAddressFaxRequired').show();
            }
            else {
                $('#pnlAddressFaxRequired').hide();
            }
        }

    </script>
    <table class="adminContent">
        <tr>
            <td colspan="2">
                <em>@T("Admin.Configuration.Settings.CustomerUser.AddressFormFields.Description")</em>
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.CompanyEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.CompanyEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.CompanyEnabled)
            </td>
        </tr>
        <tr id="pnlAddressCompanyRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.CompanyRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.CompanyRequired)
                @Html.ValidationMessageFor(model => model.AddressSettings.CompanyRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.StreetAddressEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.StreetAddressEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.StreetAddressEnabled)
            </td>
        </tr>
        <tr id="pnlAddressStreetAddressRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.StreetAddressRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.StreetAddressRequired)
                @Html.ValidationMessageFor(model => model.AddressSettings.StreetAddressRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.StreetAddress2Enabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.StreetAddress2Enabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.StreetAddress2Enabled)
            </td>
        </tr>
        <tr id="pnlAddressStreetAddress2Required">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.StreetAddress2Required):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.StreetAddress2Required)
                @Html.ValidationMessageFor(model => model.AddressSettings.StreetAddress2Required)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.ZipPostalCodeEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.ZipPostalCodeEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.ZipPostalCodeEnabled)
            </td>
        </tr>
        <tr id="pnlAddressZipPostalCodeRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.ZipPostalCodeRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.ZipPostalCodeRequired)
                @Html.ValidationMessageFor(model => model.AddressSettings.ZipPostalCodeRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.CityEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.CityEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.CityEnabled)
            </td>
        </tr>
        <tr id="pnlAddressCityRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.CityRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.CityRequired)
                @Html.ValidationMessageFor(model => model.AddressSettings.CityRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.CountryEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.CountryEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.CountryEnabled)
            </td>
        </tr>
        <tr id="pnlAddressStateProvinceEnabled">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.StateProvinceEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.StateProvinceEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.StateProvinceEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.PhoneEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.PhoneEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.PhoneEnabled)
            </td>
        </tr>
        <tr id="pnlAddressPhoneRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.PhoneRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.PhoneRequired)
                @Html.ValidationMessageFor(model => model.AddressSettings.PhoneRequired)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.FaxEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.FaxEnabled)
                @Html.ValidationMessageFor(model => model.AddressSettings.FaxEnabled)
            </td>
        </tr>
        <tr id="pnlAddressFaxRequired">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AddressSettings.FaxRequired):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AddressSettings.FaxRequired)
                @Html.ValidationMessageFor(model => model.AddressSettings.FaxRequired)
            </td>
        </tr>
    </table>
}
@helper TabDateTimeSettings()
{
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DateTimeSettings.AllowCustomersToSetTimeZone):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.DateTimeSettings.AllowCustomersToSetTimeZone)
                @Html.ValidationMessageFor(model => model.DateTimeSettings.AllowCustomersToSetTimeZone)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DateTimeSettings.DefaultStoreTimeZoneId):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.DateTimeSettings.DefaultStoreTimeZoneId, Model.DateTimeSettings.AvailableTimeZones)
                @Html.ValidationMessageFor(model => model.DateTimeSettings.DefaultStoreTimeZoneId)
            </td>
        </tr>
    </table>
}
@helper TabExternalAuthenticationSettings()
{
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ExternalAuthenticationSettings.AutoRegisterEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ExternalAuthenticationSettings.AutoRegisterEnabled)
                @Html.ValidationMessageFor(model => model.ExternalAuthenticationSettings.AutoRegisterEnabled)
            </td>
        </tr>
    </table>
}